---
layout: m1x_soap
title: Catalog Inventory
---
				    
<h2><a name="MAPI-Inventory-Module%3AMageCatalogInventory"></a>Module: Mage_CatalogInventory</h2>

<p>The Mage_CatalogInventory module allows you to retrieve and update stock attributes, such as status and quantity.</p>

<h4><a name="MAPI-Inventory-Inventory"></a>Inventory</h4>

<p>Allows you to retrieve and update the stock data.</p>

<p><b>Resource Name</b>: cataloginventory_stock_item</p>

<p><b>Aliases</b>:</p>
<ul>
	<li>product_stock</li>
</ul>


<p><b>Methods</b>:</p>
<ul>
	<li><a href="cataloginventory_stock_item.list.html" title="cataloginventory_stock_item.list">cataloginventory_stock_item.list</a> - Retrieve the list of stock data by product IDs</li>
	<li><a href="cataloginventory_stock_item.update.html" title="cataloginventory_stock_item.update">cataloginventory_stock_item.update</a> - Update the stock data for a list of products</li>
</ul>


<h4><a name="MAPI-Inventory-Faults"></a>Faults</h4>


<table><tbody>
<tr>
<th>  Fault Code  </th>
<th>  Fault Message  </th>
</tr>
<tr>
<td>  101  </td>
<td>  Product not exists.  </td>
</tr>
<tr>
<td>  102  </td>
<td>  Product inventory not updated. Details in error message.  </td>
</tr>
</tbody></table>


<h4><a name="MAPI-Inventory-Examples"></a>Examples</h4>

<p>Change manage_stock setting to ‘off’ in the inventory area.</p>

<p>$attributeSets = $client-&gt;call($session, ‘product_stock.update’, array(’SKU’,array(’manage_stock’=&gt;'0’,’use_config_manage_stock’=&gt;'0’)));</p>

<p>The use_config_manage_stock unchecks the ‘Use Config Settings’ box which allows you to make changes to this product and not to use the global settings that are set by default.</p>

<h5><a name="MAPI-Inventory-Example1.Workingwithstockupdate"></a>Example 1. Working with stock update</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

// Get stock info
var_dump($proxy-&gt;call($sessionId, 'product_stock.list', 'Sku'));

// Update stock info
$proxy-&gt;call($sessionId, 'product_stock.update', array('Sku', array('qty'=&gt;50, 'is_in_stock'=&gt;1)));

var_dump($proxy-&gt;call($sessionId, 'product_stock.list', 'Sku'));</pre>
		</div>
</div></div>

<h5><a name="MAPI-Inventory-Example2.ListingmultipleSKUs%27data"></a>Example 2. Listing multiple SKUs' data</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');
$sid = $client-&gt;login('apiUser', 'apiKey');

print_r(
    $client-&gt;call(
        $sid,
        'product_stock.list',
        array(
            array( // Notice the nested array
                'sku1',
                'sku2',
                'sku3',
                ...
                'skuN'
            )
        )
    )
);</pre>
		</div>
</div></div>

				    
Create the Magento file system owner                   			    
